<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-show -->
        <p v-show="true">p1</p>
        <p v-show="'abc'">p2</p>
        <p v-show="67">p3</p>
        <p v-show="0">p4</p>
        <p v-show="null">p5</p>
        <p v-show="undefined">p6</p>
        <hr>

        <button @click="flag=!flag">操作</button>
        <br><br>
        <div style="width: 100px; height: 100px; background: red;" v-if="flag"></div>   
        <hr>
        
        <!-- v-if -->
        <p v-if="age>=60">老年</p>
        <p v-else-if="age>=40">中年</p>
        <p v-else-if="age>=18">少年</p>
        <p v-else>童年</p>

    </div>
</body>
<script>
    new Vue({
        el:'#app',
        data:{
            flag:true,
            age:26
        }
    })
</script>
</html>